package cc.comac.mom.api;

import java.io.IOException;
import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;

import cc.comac.mom.bean.EquipDevBean;
import cc.comac.mom.bean.EquipDevType;
import cc.comac.mom.bean.ResultDev;
import cc.comac.mom.entity.EquipDevTypeEntity;
import cc.comac.mom.util.ResultBean;
@FeignClient(name = "mom-equipment-mgmt-srv")
public interface EquipDevTypeService {
	
	@RequestMapping(value = "/p/cs/EquipDevTypeService/insert",method = RequestMethod.POST)
	public  ResultBean insert (@RequestBody EquipDevType equipDevType);
	
	@RequestMapping(value = "/p/cs/EquipDevTypeService/update",method = RequestMethod.POST)
	public ResultBean update (@RequestBody EquipDevType equipDevType);
	
	@RequestMapping(value = "/p/cs/EquipDevTypeService/batchDelete",method = RequestMethod.POST)
	public ResultBean batchDelete(@RequestBody List<EquipDevType> equipDevType);
	
	@RequestMapping(value = "/p/cs/EquipDevTypeService/selectAllByPage",method = RequestMethod.POST)
	public ResultDev selectAllByPage(@RequestBody EquipDevType equipDevType);
	
	@RequestMapping(value = "/p/cs/EquipDevTypeService/selectBySomeField",method = RequestMethod.POST)
	public ResultDev selectBySomeField(@RequestBody EquipDevType equipDevType);

	@RequestMapping(value = "/p/cs/EquipDevTypeService/getAllEnable",method = RequestMethod.POST)
	public List<EquipDevTypeEntity> getAllEnable ();
	
	@RequestMapping(value = "/p/cs/EquipDevTypeService/importEquipDevType",consumes = MediaType.MULTIPART_FORM_DATA_VALUE,method = RequestMethod.POST)
	ResultBean importEquipDevType(@RequestPart("file") MultipartFile file,@RequestParam(value = "rootPath") String rootPath)throws IOException;

	@RequestMapping(value = "/p/cs/EquipDevTypeService/exportData",method = RequestMethod.POST)
	String exportData(@RequestParam(value = "request") HttpServletRequest request, @RequestParam(value = "response") HttpServletResponse response,@RequestBody EquipDevBean obj);

}
